feat(predict): add confirmation hook plumbing#29914
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key impacts:
Risk factors:
Performance Test Selection: |
|



Description
This PR adds minimal Predict confirmation hook plumbing needed by the upcoming Polymarket Deposit Wallet migration.
It wires TransactionController confirmation lifecycle hooks to PredictController while keeping Predict behavior as passthrough by default:
beforePublishdelegates toPredictController.beforePublish, which currently returnstrue.publishdelegates toPredictController.publishbefore Transaction Pay / 7702 / Smart Transactions, and continues normal publishing when Predict returns no transaction hash.{ transactionHash, isIntentComplete: true }, TransactionController marks the latest transaction meta asisIntentCompletebefore returning the hash.This PR intentionally contains no Polymarket Deposit Wallet business logic. It is a small foundation PR for confirmation-team review.
Changelog
CHANGELOG entry: null
Related issues
Fixes: N/A — preparatory plumbing for the Predict Deposit Wallet migration.
Manual testing steps
Local validation run:
Screenshots/Recordings
N/A — no UI changes.
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
For performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Touches transaction publishing lifecycle by adding new hooks and a short-circuit path, which could affect submission ordering and integration with Pay/7702/Smart Transactions if miswired. Default behavior remains passthrough, reducing blast radius.
Overview
Adds Predict-specific confirmation hook plumbing into the transaction submission lifecycle. TransactionController init now calls
PredictController:beforePublishas a newhooks.beforePublish, and callsPredictController:publishat the start ofhooks.publish, short-circuiting the rest of the publish pipeline when Predict returns atransactionHash.Updates PredictController to expose new messenger methods (
beforePublish,publish) with default passthrough implementations, extends messenger action typings/permissions accordingly, and adds unit tests verifying delegation, call ordering, and the short-circuit behavior.Reviewed by Cursor Bugbot for commit 3f9d618. Bugbot is set up for automated code reviews on this repo. Configure here.